package com.mindtree.vi.business.aspect.authorization;

import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.beans.factory.annotation.Required;

import com.mindtree.vi.business.javaservice.UserUtil;
import com.mindtree.vi.dbaccess.datatypes.user.User;
import com.mindtree.vi.dbaccess.manager.user.UserTableManager;

//@Aspect
//@Order(1)
public class AuthorizationAspect {

	private UserTableManager userTableManager;
	
	//@Before("execution (* com.mindtree.vi.business..*.*(..) )")
	public Object authorize(ProceedingJoinPoint call) throws Throwable {
		//System.out.println("Need to authorize here!!--"+ call.getSignature().getName() + call.getArgs()[1]);
		User user = UserUtil.getUser();
		System.out.println(call.getKind());
		return false;
	}

	@Required
	public void setUserTableManager(UserTableManager userTableManager) {
		this.userTableManager = userTableManager;
	}

}
